package com.rambo.xpd.oslib.demo;

import com.rambo.xpd.base.vo.ClassGrid;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;

import java.io.File;

/**
 * Create by Rambo on 2017/5/24
 **/
public class XstreamDemo {

    public static void main(String[] args) throws Exception {
        XStream xstream = new XStream(new DomDriver());
        xstream.processAnnotations(ClassGrid.class);
        ClassGrid classGrid = (ClassGrid) xstream.fromXML(new File(Thread.currentThread().getContextClassLoader().getResource("demo.xml").getPath()));

        System.out.println(classGrid.getClassGridlbList().size());
    }
}